home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0833.dms / q0833.adf / FlowChartMacros / FlowChartTool_Graphic.arexx < prev    next >
Text File  |  1997-04-10  |  3KB  |  107 lines

  1. /* FlowChartTool_Box*/
  2. /* A SuperMacro by Steven. R. Giovenella, 5823 Dutchess Dr., Colorado Springs, CO 
  3. 80918.  © Copyright 1994 Steven. R. Giovenella, All rights reserved. 
  4. This macro is my gift to the Amiga community.  It may be given away freely to 
  5. anyone, but it may NOT be sold in any way, shape, or form, not even for the cost of 
  6. reproduction, shipping, or handling, without express written permission from the 
  7. author.  This macro may NOT be added to any disk which is to be sold for any price 
  8. or fee, to include shipping and handling.  The ONLY way this macro may be 
  9. distributed is on a disk which is given away 100% free of all charges, or via 
  10. telecommunications networks which do not charge any additional fee as a result of a 
  11. user downloading this particular macro, although general fees for access to the 
  12. telecommunications system as a whole are acceptable.  This macro may only 
  13. bereproduced in its entirety, including all comment lines and code.  The individual 
  14. user may alter this macro for personal use, but may not then distribute the macro 
  15. in any modified form.  If you wish, feel free to send me some money, a Christmas 
  16. card, some other piece of software, or absolutely nothing as a gift for creating this 
  17. macro.  The author of this software is not responsible for any data loss or damage to 
  18. computer equipment as a result, direct or indirect, of the use of this macro. */
  19.  
  20. Options results
  21.  
  22. /* Set maxwidth of box margins */
  23. SectionSetup TOP 1 BOTTOM 1 INSIDE 2.25 OUTSIDE 2.25 COLUMNS 4
  24. Justify CENTER
  25. Hypen  ON
  26. Hotzone .05
  27.  
  28. /* Find Range to Use */
  29. Status LinePos
  30.     PARSE VAR Result BegLine BegPos EndLine EndPos
  31.  
  32. maxwidth=0
  33. cumheight=0
  34. range=EndLine-BegLine+1
  35.  
  36. DO i=1 to range
  37.     linenum=BegLine+i-1
  38.     MoveToLine linenum 0
  39.     Status LineHeight
  40.         lh=Result
  41.     Status Fontname
  42.         fname=Result
  43.     Status FontSize
  44.         fsize=Result
  45.     TextBlockTypePrefs SIZE fsize FONT fname
  46.     ShiftDOWN
  47.     CtrlDOWN
  48.     Cursor DOWN
  49.     Extract
  50.         textline=Result
  51.     ShiftUP
  52.     CtrlUP
  53.     yspot=.25+cumheight
  54.     xspot=1.75
  55.     DrawTextBlock 1 xspot yspot textline
  56.     CurrentObject
  57.         obj.i=Result
  58.     cumheight=cumheight+lh    *.85
  59.     IF i=1 THEN DO
  60.         FirstObject SELECTED
  61.             firstobj=Result
  62.         END
  63.     END
  64.  
  65. newcumheight=0
  66. DO i=1 to range
  67.     GetObjectCoords obj.i
  68.         PARSE VAR Result page left top width height
  69.     newxpos=4.25-.5*width
  70.     newypos=(.75-.5*cumheight)+newcumheight
  71.     newcumheight=height+newcumheight
  72.     SetObjectCoords obj.i page newxpos newypos width height
  73.     END
  74. SelectObject
  75.  
  76. /* Get Graphic */
  77. Insert GRAPHIC
  78. ObjectToBack
  79. i=i+1
  80. CurrentObject
  81.     obj.i=Result
  82.  
  83. GraphicTool
  84. DO i=1 to (range+3)
  85.     SelectObject obj.i MULTIPLE
  86.     END
  87. Group
  88. Cut
  89. TextTool
  90.  
  91. /* Paste into FlowChart section */
  92. /* Goto FlowChart section or create one */
  93. SectionSetup NEWNAME "Main"
  94. GotoSection "FlowChart"
  95. GetSectionSetup NAME 
  96. IF Result~="FlowChart" THEN DO
  97.     NewSection Text Name "FlowChart" AFTER
  98.     GotoSection "FlowChart"
  99.     END
  100.  
  101. Paste
  102. Ungroup
  103. GraphicTool
  104. redraw
  105. ObjectToFront
  106.  
  107.